package models;

import java.io.Serializable;

import javax.annotation.Untainted;
import javax.jdo.annotations.Index;
import javax.persistence.Id;

import com.googlecode.objectify.Key;
import com.googlecode.objectify.annotation.Cached;
import com.googlecode.objectify.annotation.Indexed;
import com.googlecode.objectify.annotation.Parent;
import com.googlecode.objectify.annotation.Unindexed;

@Cached
public class GeoModel implements Serializable {
	@Id private String geoId = "";
	
	@Unindexed private String name = "";
	
	@Indexed private String parentId = "";
	
	/*
	 * Parent contain all parent id form parent root to this geo.
	 * Example geo is Ha noi. Parent root is : Countries (id: 15) --> Vietnam (id: 256) --> Ha noi (Id: 1000)
	 * parent values is : 15,256,1000
	 */
	@Indexed private String parents = "";
	
	@Unindexed private int level = 0;
	
	@Unindexed private String type = "city"; //city, district, ward
	
	@Indexed private String alias = "";
	
	@Indexed private String listRoute = "";


	public String getGeoId() {
		return geoId;
	}

	public void setGeoId(String geoId) {
		this.geoId = geoId;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getParentId() {
		return parentId;
	}

	public void setParentId(String parentId) {
		this.parentId = parentId;
	}

	public int getLevel() {
		return level;
	}

	public void setLevel(int level) {
		this.level = level;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getParents() {
		return parents;
	}

	public void setParents(String parents) {
		this.parents = parents;
	}

	public String getAlias() {
		return alias;
	}

	public void setAlias(String alias) {
		this.alias = alias;
	}
}
